<?php

/**
 * 云商城样式模板
 */
if (!defined('IN_CRONLITE')) die();
$title = $conf['sitename'];
include 'template/cloud/header.php';
?>
<!-- 商城 -->
<style>
    .headers {
        border: none;
        border-bottom: solid 1px #eee;
        text-align: left;
    }

    .CouponCss {
        margin-bottom: 0.2em;
    }

    .CouponCss .layui-card {
        padding: 0;
        box-shadow: 3px 3px 12px #ddd;
        cursor: pointer;
        transition: all .6s;
        overflow: hidden;
        border-radius: 0.3em;
    }

    .CouponCss .layui-card:hover {
        box-shadow: 3px 3px 18px rgb(187, 184, 184);
    }

    .CouponCss img {
        width: 3em;
        height: 3em;
        display: block;
        margin: 0.5em auto;
    }

    .CouponCss ul {
        padding: 0;
        margin: 0;
    }

    .CouponCss ul li {
        font-size: 0.6em;
        color: rgba(0, 0, 0, 0.527);
    }
</style>
<div id="goodType">
    <div class="card" style="padding: 1em">
        <?= $conf['notice_top'] ?>
    </div>
    <div id="appid">
        <div v-if="Type==1" class="contacts row" style="display: none" :style="Type==1?'display: ':'display: none'">
            <div class="col-xl-2 col-lg-3 col-sm-4 col-6" style="display: none;" :style="CouponData.length>=1?'display:block;':'display: none;'">
                <div class="contacts__item shadow-sm" @click="Coupon">
                    <span class="data-tid contacts__img goodTypeChange">
                        <img src="/assets/img/coupon_4.png" class="lazy"
                            style="height: 9em;border-radius: 0.5em;max-width:140px;" />
                    </span>
                    <div class="contacts__info">
                        <strong style="font-size: 1.3em;color:red;">点我领取优惠券</strong>
                    </div>
                    <span class="contacts__btn goodTypeChange" style="display: block;color: rgba(255, 0, 0, 0.466);">共{{
                        CouponData.length }}个,可重复领取
                    </span>
                </div>
            </div>
            <div class="col-xl-2 col-lg-3 col-sm-4 col-6" v-for="(item, index) in ClassData" :key="index">
                <div @click="CutGoods(item.cid,index)" class="contacts__item shadow-sm">
                    <span class="data-tid contacts__img goodTypeChange">
                        <img v-if="item.image!=''" class="lazy" :src="item.image"
                            style="height: 9em;border-radius: 0.5em" :alt="item.name" />
                    </span>
                    <div class="contacts__info">
                        <strong>{{ item.name }}</strong>
                    </div>
                    <span class="contacts__btn goodTypeChange" style="display: block;">共有{{ item.count }}个商品
                    </span>
                </div>
            </div>
        </div>
        <div v-if="Type==2" class="contacts row" id="gid" style="display: none"
            :style="Type==2?'display: ':'display: none'">
            <div class="layui-btn layui-btn-primary layui-btn-fluid headers  layui-elip" style="margin-bottom: 2em;"
                @click="CutClass">
                <i class="layui-icon">&#xe603; {{ name }}</i>
            </div>
            <div class="col-xl-2 col-lg-3 col-sm-4 col-6" style="display: none;" :style="CouponData.length>=1?'display:block;':'display: none;'">
                <div class="contacts__item shadow-sm" @click="Coupon">
                    <a href="#" class="data-tid contacts__img goodTypeChange">
                        <img style="height: 100% !important;width:100% !important;border-radius: 0.5em;max-height:135px;max-width:135px;"
                            src="/assets/img/coupon_4.png" alt="惊喜优惠券">
                    </a>
                    <div class="contacts__info">
                        <strong style="font-size: 1.3em;color:red;">点我领取优惠券</strong>
                        <strong style="font-size: 1.2em;color:red;">共{{ CouponData.length }}个,可重复领取</strong>
                    </div>
                    <button class="contacts__btn">领取优惠券</button>
                </div>
            </div>
            <div class="col-xl-2 col-lg-3 col-sm-4 col-6" v-for="(item, index) in GoodsData" :key="index">
                <div class="contacts__item shadow-sm">
                    <a :href="'/?mod=shop&gid='+item.gid" class="data-tid contacts__img goodTypeChange">
                        <img v-if="item.image!=''" class="lazy" :src="item.image"
                            style="height: 9em;border-radius: 0.5em" :alt="item.name" />
                    </a>
                    <div class="contacts__info">
                        <strong>{{ item.name }}</strong>
                        <small>{{ (item.quota>=1?'剩余'+item.quota+'份':'库存不足') }}</small>
                    </div>
                    <a :href="'/?mod=shop&gid='+item.gid" class="contacts__btn " style="display: block;"
                        v-html="Price(item)">
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<?php include 'template/cloud/bottom.php'; ?>
<!-- 结束 -->
<script>
    var cid = <?= (empty($_QET['cid']) ? -1 : $_QET['cid']) ?>;
</script>
<script src="<?php echo $cdnserver; ?>assets/js/vue3.js"></script>
<script src="<?php echo $cdnserver; ?>assets/template/cloud/assets/js/index.js?vs=<?= $accredit['versions'] ?>"
    type="text/javascript"></script>
</body>

</html>